package com.star.blog.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.star.blog.dos.Archives;
import com.star.blog.pojo.Article;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 聂建强
 * @since 2021-11-20
 */
public interface ArticleMapper extends BaseMapper<Article> {

    List<Archives> listArchives();

    /**
     * 根据文章id查询文章详情
     * @param articleId
     * @return
     */
    Article findArticleById(Long articleId);

    IPage<Article> listArticle(Page<Article> page, Long categoryId, Long tagId, String year, String month);
}
